]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
background: Do not queue idle when cancelled
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 13 Apr 2022 18:51:55 +0000 (20:51 +0200)
committerMarge Bot <marge-bot@gnome.org>
Wed, 13 Apr 2022 21:12:27 +0000 (21:12 +0000)
A cancelled cancellable means that the background was destroyed,
so we shouldn't queue an idle or emit the 'loaded' signal anymore.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5337

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2268>

js/ui/background.js

index 825fee0d9b287bfe508301e8f8efcd1ccf9ab7fc..a68f233019e6f8b89e7553ea3a78dc16d636a383 100644 (file)
@@ -333,6 +333,8 @@ var Background = GObject.registerClass({
             return;
 
         this.isLoaded = true;
+        if (this._cancellable?.is_cancelled())
+            return;
 
         let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
             this.emit('loaded');